home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
6
/
clantutr.zip
/
TEST6-8
< prev
Wrap
Text File
|
1986-04-04
|
2KB
|
54 lines
.T
and now a TEST
.R4C1
If we declare ~b~Ix~N to be an ARRAY of ~I6~N rows and ~I7~N columns, then:
.Q
The member of the ARRAY in row 3, column 3 is called
x[2][2]
~Inot~N x(2,2) or x(2)(2) or x[3,3) or etc. etc.
.Q
Which member does x+5*7+2 select ?
x[5][2]
.Q
Where does x point to ?
x is NOT a pointer!
( The names of ~I1~N-dimensional arrays are ~w~Rpointers~N.)
( Since, for example, ~b~Ix[2]~N is a 1-dim array, ~IIT~N is a ~w~Rpointer~N.)
.Q
x[3] points to which element ?
x[3][0]
.WN
0 ~b~I#include <stdio.h> ~N
1 ~b~Imain() { ~N
2 ~b~I char c; ~N
3 ~b~I while ( (c=getchar()) !='e' ) { ~N
4 ~b~I if ( 'a'<=c && c<='z') ~N
5 ~b~I printf("%c",c+'A'-'a'); ~N
6 ~b~I } ~N
7 ~b~I} ~N
.Q
If you type the letter p what will the program print ?
P
.Q
If you type the letter P what will the program print ?
P
.Q
What must you type to have the program stop ?
e
.WR9C1
.w
.R10C1
In Line 3, the program will ~b~Igetchar~N from the key